import { baseUrlApi, requestClient, type Result } from '#/api/request';

// 用户请求参数
interface UserParams {
  user_id?: string;
  keyword?: string;
}

/** 本站用户列表 */
export const getUserUsers = (params?: UserParams) => {
  return requestClient.get<Result>(baseUrlApi('/admin/user/users'), {
    params,
  });
};

/**
 * 设置用户状态
 * @param id 管理员id
 * @param status 管理员显示状态,0:隐藏;1:显示
 * @returns
 */
export const postUserUsersStatus = (id: number, status: number) => {
  return requestClient.post<Result>(
    baseUrlApi(`/admin/user/users/${id}/status/${status}`),
  );
};
